package com.xin.web;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

public class SessionServlet extends BaseServlet2{
    protected void createsession(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        boolean aNew = req.getSession().isNew();
        String id = req.getSession().getId();
        resp.getWriter().write(id);
        resp.getWriter().write(String.valueOf(aNew));
    }
}
